﻿<local:DocumentBase x:Class="WPFExcelReport.BAB55OUTPUT"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:ReflectionStudio.Core.Database;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                      
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Loaded="Window_Loaded"
                    Title="后整状态"  
                    HorizontalAlignment="Stretch"  Margin="0,0,0,0"  VerticalAlignment="Stretch" >
    <local:DocumentBase.Resources> 
        <db:INTEXDataSet x:Key="iNTEXDataSet" /> 
    </local:DocumentBase.Resources>
    <Grid DataContext=""  HorizontalAlignment="Stretch"  Margin="10,10,0,0"  VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="600" />
            <ColumnDefinition Width="400" />
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Name="zoneCommand" Height="34" Margin="0,0,0,6">
            <Button  Content="查询"  Height="23" Margin="10,0,0,0"  Name="btnQuery" Width="75" Click="btnQuery_Click" />
            <Button Content="仅生成报表" Margin="10,0,0,0"   Height="23"   Name="btnReport" Width="75" Click="btnReport_Click" />
            <Button Content="打印报表" Margin="10,0,0,0"  Height="23" Name="btnPrint" Width="90" Click="btnPrint_Click"/>
            <Button Content="浏览数据"  Margin="10,0,0,0"  Height="23"  Name="btnPrintPreview" Width="90" Click="btnPrintPreview_Click"/>
        </WrapPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel >
                <Label Content="开始日期"    Width="80" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtBYEAR" Width="50" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="2011" Foreground="#FF211A1A" />
                <Label Content="年"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtBMONTH" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Beige" Text="05" FontSize="18" Height="30" Foreground="#FF211A1A" />
                <Label Content="月"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtBDAY" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="01" Height="30" Foreground="#FF211A1A" />
                <Label Content="日"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" />
                <Label Content="结束日期"    Width="80" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtEYEAR" Width="50" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="2011" Foreground="#FF211A1A" />
                <Label Content="年"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtEMONTH" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Beige" Text="05" FontSize="18" Height="30" Foreground="#FF211A1A" />
                <Label Content="月"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" Foreground="#FF211A1A" />
                <TextBox Name="txtEDAY" Width="30" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="01" Height="30" Foreground="#FF211A1A" />
                <Label Content="日"    Width="20" Margin="10,0,0,0" HorizontalAlignment="Left"    FontSize="18" VerticalAlignment="Center" />
            </WrapPanel>
        </StackPanel>
        <WrapPanel Grid.Row="2"  Grid.Column="0"  Grid.ColumnSpan="2">
            <fd:FilteringDataGrid AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                                ItemsSource="{Binding}" 
                                            HeadersVisibility="Column"
                                              x:Name="MasterDg" 
                                                 CanUserReorderColumns="True"  
                                  CanUserResizeColumns="True"
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="Auto"
                                              Height="500"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              SelectionChanged="ItemsControls_SelectionChanged"
                                              >
                <DataGrid.Columns>
                    <!--FPRODUCER,BMBEM,ABPARTTYPE,ARTICLE,BMSOLLLG,ABPSOLLMENGE1,ABPEALFM-->
                    <DataGridTextColumn Binding="{Binding Path=FPRODUCER}" Header="织厂" Foreground ="Red" Width="SizeToHeader"  MinWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=BMBEM}" Header="缸号" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABPARTTYPE}" Header="类型" Width="SizeToHeader"  MinWidth="80"/>
                    <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="品种" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=BZSOLLVLG}" Header="送轴长度" Foreground ="Red" Width="SizeToHeader"  MinWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=ABPSOLLMENGE1}" Header="预计坯布量" Foreground ="Red" Width="SizeToHeader"  MinWidth="60"/>
                    <DataGridTextColumn Binding="{Binding Path=ABPEALFM}" Header="已出坯布" Foreground ="Red" Width="SizeToHeader"  MinWidth="60"/>
                </DataGrid.Columns>
            </fd:FilteringDataGrid>
        </WrapPanel>
    </Grid>
</local:DocumentBase>
